/**
 * jquery validate扩展 郭新杰
 */
// 最多两位小数
jQuery.validator.addMethod("udouble", function(value, element) {
	var tel = /^[0-9]+(.[0-9]{0,2})?$/;
	return this.optional(element) || (tel.test(value));
}, "最多两位小数");
// 手机号验证
jQuery.validator.addMethod("phone", function(value, element) {
	var phone = /^1[34578]\d{9}$/;
	return this.optional(element) || (phone.test(value));
}, "请输入正确的手机号");
// 身份证号验证
jQuery.validator.addMethod("idcard", function(value, element) {
	var idcard = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
	return this.optional(element) || (idcard.test(value));
}, "身份证号格式不对");